Skip to main content
Version: V4.0

Device Management API


Get Device List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
page_sizeIntegerBodyYesPage size
page_indexIntegerBodyYesPage index
residence_idStringBodyYesResidence ID
sub_device_type[]StringBodyNoSub-device type
show_abilityBooleanBodyNoWhether show device ability or not?
true: show
false: hide
parallel_sub_deviceBooleanBodyNoWhether the sub-device is parallel or not?
true: parallel
false: nesting

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID
device_nameStringBodyDevice name
product_nameStringBodyProduct name
device_typeStringBodyDevice type
device_picture_urlStringBodyDevice picture URL
onlineBooleanBodyWhether the device is online or not?
true: online
false: offline
abilities[]Object<ability>BodyAbility information
spaceObject<space>BodySpace information
sub_devices[]Object<result>BodySub-devices information
parent_device_idStringBodyParent device ID

ability description

Parameter NameTypeLocationDescription
ability_idStringBodyAbility ID
ability_nameStringBodyAbility name
ability_typeStringBodyAbility type, see Standard Device Model
ability_attribute[]StringBodyAbility attribute, see Standard Device Model
stateStringBodyState, see Standard Device Model
attributeObjectBodyAttribute, see Standard Device Model

space description

Parameter NameTypeLocationDescription
space_idStringBodySpace ID
space_nameStringBodySpace name
parent_space_idStringBodyParent space ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"show_ability": true,
"parallel_sub_device": false
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true,
"parent_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
],
"parent_device_id": ""
}
]
}

Failure Return Example

See Failure Return Example



Get Device Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID
device_nameStringBodyDevice name
product_nameStringBodyProduct name
device_typeStringBodyDevice type
device_picture_urlStringBodyDevice picture URL
onlineBooleanBodyWhether the device is online or not?
true: online
false: offline
abilities[]Object<ability>BodyAbility information
spaceObject<space>BodySpace information
sub_devices[]Object<result>BodySub-devices information

ability description

Parameter NameTypeLocationDescription
ability_idStringBodyAbility ID
ability_nameStringBodyAbility name
ability_typeStringBodyAbility type, see Standard Device Model
ability_attribute[]StringBodyAbility attribute, see Standard Device Model
stateStringBodyState, see Standard Device Model
attributeObjectBodyAttribute, see Standard Device Model

space description

Parameter NameTypeLocationDescription
space_idStringBodySpace ID
space_nameStringBodySpace name
parent_space_idStringBodyParent space ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_name": "My Device",
"product_name": "HyPanel",
"device_type": "PS51",
"device_picture_url": "https://test.akubela.com/g.png",
"online": true,
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1",
"ability_type": "light",
"ability_attribute": [
"brightness"
],
"state": "on",
"attribute": {
"brightness": 70
}
},
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cb",
"ability_name": "led2",
"ability_type": "light",
"ability_attribute": [],
"state": "off",
"attribute": {}
}
],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"sub_devices": [
{
"device_id": "d8b5a73f8dd84abaa94b1c288be49b0cf",
"device_name": "My Sub Device",
"product_name": "Motion Sensor",
"device_type": "Motion Sensor",
"device_picture_url": "https://test.akubela.com/o.png",
"abilities": [],
"space": {
"parent_space_id": "f8b5a73f8dd84abaa94b1c288be49b0ca",
"space_id": "rf8b5a73f8dd84abaa94b1c288be49b0c",
"space_name": "kitchen"
},
"online": true
}
]
}
]
}

Failure Return Example

See Failure Return Example



Control Device

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
ability_idStringBodyYesAbility ID
controlStringBodyYesControl, see Standard Device Model
attributeObjectBodyNoAttribute, see Standard Device Model

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Control Device

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
devices[]Object<device>BodyYesDevice information

device description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
ability_idStringBodyYesAbility ID
controlStringBodyYesControl, see Standard Device Model
attributeObjectBodyNoAttribute, see Standard Device Model

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_control_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"devices": [
{
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"ability_id": "e8b5a73f8dd84abaa94dcs288be49b4ce",
"control": "turn_on",
"attribute": {
"brightness": 70
}
}
]
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Control Device Group

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
spaces[]Object<space>BodyYesSpace information
devices[]Object<device>BodyYesDevice information

space description

Parameter NameTypeLocationRequiredDescription
space_idStringBodyYesSpace ID

device description

Parameter NameTypeLocationRequiredDescription
ability_typeStringBodyYesAbility type, see Standard Device Model
controlStringBodyYesControl, see Standard Device Model

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_control_device_group",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"spaces": [
{
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0d2"
}
],
"devices": [
{
"ability_type": "light",
"control": "turn_on"
}
]
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Turn on Scanning Device

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
gateway_device_idStringBodyYesGateway device ID
device_typeStringBodyNoDevice type
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "turn_on_scanning_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"device_type": "light",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Turn off Scanning Device

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
gateway_device_idStringBodyYesGateway device ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "turn_off_scanning_device",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Update Device Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
space_idStringBodyYesSpace ID
device_nameStringBodyYesDevice name
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_name": "test_device_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"space_id": "rc3c6e408413be7fdc3e60f34f0950d6b"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Update Device Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
devices[]Object<device>BodyYesDevice information
residence_idStringBodyYesResidence ID

device description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
space_idStringBodyYesSpace ID
device_nameStringBodyYesDevice name

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_update_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"space_id": "rcf986cb4c00d4a031a56a51a81e430d5",
"device_name": "test_device_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Update Device Ability Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
ability_idStringBodyYesAbility ID
ability_nameStringBodyYesAbility name
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"ability_name": "test_name",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3cbca664f4a10a0ce95452be1b67ca58",
"ability_id": "ac3c6e408413be7fdc3e60f34f0950d6b"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Update Device Ability Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
devices[]Object<device>BodyYesDevice information
residence_idStringBodyYesResidence ID

device description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
ability_idStringBodyYesAbility ID
ability_nameStringBodyYesAbility name

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_update_device_ability_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "d2ab24943ba75edc0a77211e5084f95e0",
"ability_id": "acf986cb4c00d4a031a56a51a81e430d5",
"ability_name": "test_name"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Delete Device Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Device Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
devices[]Object<device>BodyYesDevice information
residence_idStringBodyYesResidence ID

device description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"devices": [
{
"device_id": "dfdae91916dc3547beabd353b2dad7a42"
}
],
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get ZigBee Device Type List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
zigbee_device_type[]StringBodyZigBee device type

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_zigbee_device_type_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"zigbee_device_type": []
}
}

Failure Return Example

See Failure Return Example



Create ZigBee Device Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
gateway_device_idStringBodyYesGateway device ID
zigbee_device_typeStringBodyYesZigBee device type
residence_idStringBodyYesResidence ID
macStringBodyYesMAC

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID
onlineBooleanBodyWhether the device is online or not?
true: online
false: offline
multi_channel_devices[]Object<multi_channel_device>BodyMulti-channel device information

multi_channel_device description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_zigbee_device_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"gateway_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"zigbee_device_type": "light",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"mac": "C34568542456"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0c3",
"multi_channel_devices": [],
"online": true
}
}

Failure Return Example

See Failure Return Example



Get Infrared Remote Controller List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
infrared_remote_controller_typeStringBodyYesInfrared remote controller type
AC Remote: air condition
TV Remote: television
residence_idStringBodyYesResidence ID
infrared_remote_controller_brand_idStringBodyYesInfrared remote controller brand ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
infrared_remote_controllers[]Object<infrared_remote_controller>BodyInfrared remote controller information

infrared_remote_controller description

Parameter NameTypeLocationDescription
infrared_remote_controller_idStringBodyInfrared remote controller ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_infrared_remote_controller_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"infrared_remote_controller_brand_id": "0"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"infrared_remote_controllers": [
{
"infrared_remote_controller_id": "0"
}
]
}
}

Failure Return Example

See Failure Return Example



Get Infrared Remote Controller Brand List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
infrared_remote_controller_typeStringBodyYesInfrared remote controller type
AC Remote: air condition
TV Remote: television
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
infrared_remote_controller_brands[]Object<infrared_remote_controller_brand>BodyInfrared remote controller brand information

infrared_remote_controller_brand description

Parameter NameTypeLocationDescription
infrared_remote_controller_brand_idStringBodyInfrared remote controller brand ID
infrared_remote_controller_brand_nameStringBodyInfrared remote controller brand name

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_infrared_remote_controller_brand_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"infrared_remote_controller_brands": [
{
"infrared_remote_controller_brand_name": "midea",
"infrared_remote_controller_brand_id": "0"
}
]
}
}

Failure Return Example

See Failure Return Example



Create Infrared Remote Controller Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
infrared_remote_controller_matchingBooleanBodyYesWhether the infrared remote controller matching is successful or not?
true: success
false: failure
infrared_remote_controller_typeStringBodyYesInfrared remote controller type
AC Remote: air condition
TV Remote: television
residence_idStringBodyYesResidence ID
infrared_remote_controller_idStringBodyYesInfrared remote controller ID
parent_device_idStringBodyYesParent device ID
infrared_remote_controller_brand_idStringBodyYesInfrared remote controller brand ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_infrared_remote_controller_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_matching": true,
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"parent_device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"infrared_remote_controller_brand_id": "0",
"infrared_remote_controller_id": "0"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx"
}
}

Failure Return Example

See Failure Return Example



Infrared Remote Controller Matching

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
infrared_remote_controller_function_keyStringBodyNoInfrared remote controller function key
infrared_remote_controller_typeStringBodyYesInfrared remote controller type
AC Remote: air condition
TV Remote: television
residence_idStringBodyYesResidence ID
infrared_remote_controller_idStringBodyYesInfrared remote controller ID
device_idStringBodyYesDevice ID
infrared_remote_controller_brand_idStringBodyYesInfrared remote controller brand ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "infrared_remote_controller_matching",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"infrared_remote_controller_type": "AC Remote",
"residence_id": "re8b5a73f8dd84abaa94b1c288be49b0c",
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0cx",
"infrared_remote_controller_brand_id": "0",
"infrared_remote_controller_id": "0"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Light Control Group Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_nameStringBodyDevice name
space_idStringBodySpace ID
control_groupObject<control_group>BodyControl group

control_group description

Parameter NameTypeLocationDescription
low_brightness_level_groups[]Object<brightness_level_group>BodyLow brightness level group information
medium_brightness_level_groups[]Object<brightness_level_group>BodyMedium brightness level group information
high_brightness_level_groups[]Object<brightness_level_group>BodyHigh brightness level group information

brightness_level_group description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID
ability_idStringBodyAbility ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d11adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}

Failure Return Example

See Failure Return Example



Get Groupable Control Light List

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID
device_nameStringBodyDevice name
space_idStringBodySpace ID
space_nameStringBodySpace name
abilities[]Object<ability>BodyAbility information

ability description

Parameter NameTypeLocationDescription
ability_idStringBodyAbility ID
ability_nameStringBodyAbility name

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_groupable_control_light_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"device_id": "dafa332e258aae1badbb27d31128f442d",
"device_name": "test_device",
"space_id": "r8b5a73f8dd84abaa94dcs248be49b0db",
"space_name": "my room",
"abilities": [
{
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0cv",
"ability_name": "led1"
}
]
}
]
}

Failure Return Example

See Failure Return Example



Create Light Control Group Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_nameStringBodyYesDevice name
space_idStringBodyYesSpace ID
control_groupObject<control_group>BodyYesControl group

control_group description

Parameter NameTypeLocationRequiredDescription
low_brightness_level_groups[]Object<brightness_level_group>BodyYesLow brightness level group information
medium_brightness_level_groups[]Object<brightness_level_group>BodyYesMedium brightness level group information
high_brightness_level_groups[]Object<brightness_level_group>BodyYesHigh brightness level group information

brightness_level_group description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
ability_idStringBodyYesAbility ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
device_idStringBodyDevice ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"device_id": "d8b5a73f8dd84abaa94dcs248be49b0d1"
}
}

Failure Return Example

See Failure Return Example



Update Light Control Group Information

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
device_nameStringBodyYesDevice name
space_idStringBodyYesSpace ID
control_groupObject<control_group>BodyYesControl group

control_group description

Parameter NameTypeLocationRequiredDescription
low_brightness_level_groups[]Object<brightness_level_group>BodyYesLow brightness level group information
medium_brightness_level_groups[]Object<brightness_level_group>BodyYesMedium brightness level group information
high_brightness_level_groups[]Object<brightness_level_group>BodyYesHigh brightness level group information

brightness_level_group description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
ability_idStringBodyYesAbility ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_light_control_group_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dafa332e258aae1badbb27d31128f5521",
"device_name": "test",
"space_id": "rafa332e258aae1badbb27d31128f442d",
"control_group": {
"low_brightness_level_groups": [
{
"device_id": "dafa332e258aae1badbb27d31128f4421",
"ability_id": "e8b5a73f8dd84abaa94b1c288be49b0c1"
}
],
"medium_brightness_level_groups": [],
"high_brightness_level_groups": []
}
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Lock Basic Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
languageStringBodyLanguage
supported_language[]StringBodySupported language
volumeStringBodyVolume, high or medium or low or mute
dwell_alarmBooleanBodyWhether the dwell alarm is enable or not?
true: enable
false: disable
dwell_timeIntegerBodyDwell time (s), 15 or 20 or 25
monitoring_scopeStringBodyMonitoring scope, large or small
double_verificationBooleanBodyWhether the double verification is enable or not?
true: enable
false: disable
wifi_ssidStringBodyWiFi SSID
wifi_ipStringBodyWiFi IP
wifi_gatewayStringBodyWiFi gateway
wifi_rssiIntegerBodyWiFi RSSI
lock_versionStringBodyLock version
rtsp_urlStringBodyRTSP URL
support_audio_intercomBooleanBodySupport audio intercom
true: supported
false: not supported
ciphertextStringBodyCiphertext, dependent on SDK

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"language": "en",
"supported_language": [
"zh",
"en"
],
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true,
"wifi_ssid": "akubela",
"wifi_ip": "192.168.19.190",
"wifi_gateway": "192.168.19.1",
"wifi_rssi": -30,
"rtsp_url": "rtsp://192.168.19.32",
"support_audio_intercom": true,
"ciphertext": "7b3d75f5a8cfa959167852468fca08a1",
"lock_version": ""
}
}

Failure Return Example

See Failure Return Example



Update Lock Basic Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
residence_idStringBodyYesResidence ID
languageStringBodyNoLanguage
volumeStringBodyNoVolume, high or medium or low or mute
dwell_alarmBooleanBodyNoWhether the dwell alarm is enable or not?
true: enable
false: disable
dwell_timeIntegerBodyNoDwell time (s), 15 or 20 or 25
monitoring_scopeStringBodyNoMonitoring scope, large or small
double_verificationBooleanBodyNoWhether the double verification is enable or not?
true: enable
false: disable

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_lock_basic_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"language": "en",
"volume": "high",
"dwell_alarm": true,
"dwell_time": 20,
"monitoring_scope": "large",
"double_verification": true
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Lock Temp Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
key_idStringBodyKey ID
key_nameStringBodyKey name
temp_keyStringBodyTemp key
repeat_modeStringBodyRepeat mode, never or weekly
available_days[]StringBodyAvailable days
start_timeStringBodyStart time, UTC
finish_timeStringBodyFinish time, UTC

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"repeat_mode": "never",
"available_days": [],
"start_time": "2024-03-15 12:32:43",
"finish_time": "2024-03-15 17:32:43",
"temp_key": "01234567"
}
]
}

Failure Return Example

See Failure Return Example



Create Lock Temp Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
key_nameStringBodyYesKey name
temp_keyStringBodyYesTemp key
repeat_modeStringBodyYesRepeat mode, never or weekly
available_days[]StringBodyNoAvailable days
start_timeStringBodyYesStart time, UTC
finish_timeStringBodyYesFinish time, UTC

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
key_idStringBodyKey ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_name": "test",
"temp_key": "01234567",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "12:32:43",
"finish_time": "17:32:43",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}

Failure Return Example

See Failure Return Example



Delete Lock Temp Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Lock Temp Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
keys[]Object<key>BodyYesKey information
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

key description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_lock_temp_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Lock Open Door Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
key_idStringBodyKey ID
key_nameStringBodyKey name
open_door_keyStringBodyOpen door key

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test",
"open_door_key": "123456"
}
]
}

Failure Return Example

See Failure Return Example



Create Lock Open Door Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
key_nameStringBodyNoKey name
open_door_keyStringBodyYesOpen door key

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObject<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
key_idStringBodyKey ID

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "create_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"open_door_key": "123456",
"key_name": "test",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
}

Failure Return Example

See Failure Return Example



Update Lock Open Door Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
key_idStringBodyYesKey ID
key_nameStringBodyYesKey name

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Delete Lock Open Door Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Lock Open Door Key Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
keys[]Object<key>BodyYesKey information
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

key description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_lock_open_door_key_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Lock Fingerprint Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
key_idStringBodyKey ID
key_nameStringBodyKey name

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}

Failure Return Example

See Failure Return Example



Update Lock Fingerprint Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
key_idStringBodyYesKey ID
key_nameStringBodyYesKey name

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Delete Lock Fingerprint Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Lock Fingerprint Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
keys[]Object<key>BodyYesKey information
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

key description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Turn on Lock Fingerprint Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "turn_on_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Turn off Lock Fingerprint Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "turn_off_lock_fingerprint_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Lock Card Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
key_idStringBodyKey ID
key_nameStringBodyKey name

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test"
}
]
}

Failure Return Example

See Failure Return Example



Update Lock Card Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
key_idStringBodyYesKey ID
key_nameStringBodyYesKey name

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "update_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52",
"device_id": "d3b5a73f8dd84abaa94dcs288be49b0pf",
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"key_name": "test2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Delete Lock Card Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5",
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Batch Delete Lock Card Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
keys[]Object<key>BodyYesKey information
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID

key description

Parameter NameTypeLocationRequiredDescription
key_idStringBodyYesKey ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "batch_delete_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"keys": [
{
"key_id": "kr31adc223cc4b3bedb6bd4742dedcfa5"
}
],
"residence_id": "r4b5a73f8dd84abaa94dcs248be49b0db",
"device_id": "dr31adc223cc4b3bedb6bd4742dedcfa2"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Turn on Lock Card Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "turn_on_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Turn off Lock Card Config

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
residence_idStringBodyYesResidence ID

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "turn_off_lock_card_config",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example



Get Lock History

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
residence_idStringBodyYesResidence ID
device_idStringBodyYesDevice ID
page_sizeIntegerBodyYesPage size
page_indexIntegerBodyYesPage index
lock_record_typeStringBodyNoLock record type, unlock or alarm or doorbell or capture

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
result[]Object<result>BodyReturn result

result description

Parameter NameTypeLocationDescription
lock_record_idStringBodyLock record ID
lock_record_typeStringBodyLock record type, unlock or alarm or doorbell or capture
capture_picture_urlStringBodyCapture picture URL
lock_timeStringBodyLock time, UTC
noteStringBodyNote

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "get_lock_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"device_id": "d1b5a73f8dd84abaa94dcs248be49b0db",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

{
"success": true,
"timestamp": 1540869200562,
"result": [
{
"lock_record_id": "r1b5a73f8dd84abaa94dcs248be49b0d1",
"lock_type": "unlock",
"capture_picture_url": "",
"lock_time": "2025-02-16 13:32:43",
"note": ""
}
]
}

Failure Return Example

See Failure Return Example



Lock Wakeup

Request URL

POST /api/v1.0/invoke/open-ability/method/user-commands

Request Parameter

Parameter NameTypeLocationRequiredDescription
Content-TypeStringHeaderYesContent type, the value is application/json
AcceptStringHeaderYesAccept, the value is application/json
AuthorizationStringHeaderYesBearer authorization, access token
commandStringBodyYesCommand name
idStringBodyYesCommand ID
paramObject<param>BodyYesCommand parameter

param description

Parameter NameTypeLocationRequiredDescription
device_idStringBodyYesDevice ID
residence_idStringBodyYesResidence ID
wakeup_modeStringBodyNoWakeup mode, sip (default) or bluetooth

Return Parameter

Parameter NameTypeLocationDescription
Content-TypeStringHeaderContent type, the value is application/json
successBooleanBodyWhether the request is successful or not?
true: success
false: failure
timestampIntegerBodyTimestamp
resultObjectBodyReturn result

Request Example

POST /api/v1.0/invoke/open-ability/method/user-commands

Content-Type: application/json

Accept: application/json

Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9

{
"command": "lock_wakeup",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"device_id": "d8b5a73f8dd84abaa94dcs288be49b0lv",
"residence_id": "r31adc223cc4b3bedb6bd4742dedcfa52"
}
}

Success Return Example

Status Code: 200

Content-Type: application/json

{
"success": true,
"timestamp": 1540869200562,
"result": {}
}

Failure Return Example

See Failure Return Example